#ifndef SQUARE_H_
#define SQUARE_H_

#include "../Pieces/Piece.h"

#include <string>
using namespace std;

namespace Core
{
	class Chessboard;

	class Square
	{
	public:
		Square(Chessboard * board, int rank, int column);
		~Square(void);

		Chessboard * board() const { return _board; }
		int row() const { return _rank; }
		int column() const { return _column; }
		int key() const { return _rank * 10 + _column; }
		Piece * piece() const;
		void piece(Piece * val);

	private:
		Chessboard * _board;
		string _name;
		int _rank;
		int _column;
		Piece * _piece;
	};
}

#endif
